<div class="gap"></div>
<div class="gap"></div>
<section class="reports">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-primary">
                    <div class="panel-body text-center">
                        <h1 class="blue">Web Report 2</h1>
                        <h3>Yearly Statewise Complaint Distribution </h3>
                        <h4>(As recorded by the National Anti Ragging Help Line)</h4>
                        <h2 class="blue">(From June 2009 upto <?php echo date('Y-m-d'); ?>)</h2>
                        <div class="search-form">
                            <div class="row buttons">
                                <a href="<?php echo  Yii::app()->createAbsoluteUrl('site/downloadYearwise');?>" target="_blank">
                                    <input id="export-btn" type="button" value="Download" onclick="export()"/>
                                </a>
                            </div>
                        </div>
                    </div>  

                </div>
            </div>
        </div>
        
       

        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">Overall Reports</h3>
                    </div>
                    <div class="panel-body">
                        <div class="Table" style="width:100%;">

                            <div class="Heading" style="background-color: #0072bc">
                                <div class="Cell">
                                    <p>State Name</p>
                                </div>
                                <?php foreach ($yearReport as $yearReports) { ?>
                                    <div class="Cell">
                                        <p><?php echo $yearReports->year; ?></p>
                                    </div>
                                <?php } ?>
                                <div class="Cell">
                                    <p>Total</p>
                                </div>
                            </div>

                            <?php foreach ($stateyearReport as $stateyearReports) { ?>
                                <div class="Row">  
                                    <div class="Cell">
                                        <p><?php echo $stateyearReports->state; ?></p>
                                    </div>
                                    <?php foreach ($yearReport as $yearReports) { ?>
                                        <div class="Cell">
                                            <p><?php echo YearReport::countYearwisedate($stateyearReports->state, $yearReports->year); ?></p>
                                        </div>
                                    <?php } ?>
                                    <div class="Cell">
                                        <p><?php echo YearReport::subtotalreport($stateyearReports->state); ?></p>
                                    </div>
                                </div>
                            <?php }
                            ?>
                            <div class="Row" style="background-color: #0072bc">  
                                <div class="Cell">
                                    <p>Grand Total</p>
                                </div>
                                <?php foreach ($yearReport as $yearReports) { ?>
                                    <div class="Cell">
                                        <p><?php echo YearReport::totalCountBYYear($yearReports->year); ?></p>
                                    </div>
                                <?php } ?>
                                <div class="Cell">
                                    <p><?php echo YearReport::totalReportCount(); ?></p>
                                </div>
                            </div>

                            <div class="gap"></div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">

                </div>
            </div>
        </div>
</section>
<div class="gap"></div>
